import request from "@/utils/request";
import requestMd5 from "@/utils/requestMd5";

export function goods_index(params) {
  return request({
    url: "/goods/index",
    method: "get",
    params
  });
}

export function goods_batchStatus(data) {
  return request({
    url: "/goods/batchStatus",
    method: "post",
    data: data
  });
}

export function goods_base(params) {
  return request({
    url: "/goods/base",
    method: "get",
    params
  });
}

export function goods_add(data) {
  return request({
    url: "/goods/add",
    method: "post",
    data: data
  });
}

export function goods_edit(data) {
  return request({
    url: "/goods/edit",
    method: "post",
    data: data
  });
}

export function goods_info(params) {
  return request({
    url: "/goods/info",
    method: "get",
    params
  });
}

export function goods_delete(data) {
  return request({
    url: "/goods/delete",
    method: "post",
    data: data
  });
}

export function goods_bulk_delete(data) {
  return request({
    url: "/goods/bulkDelete",
    method: "post",
    data: data
  });
}

export function goods_check(data) {
  return request({
    url: "/goods/check",
    method: "post",
    data: data
  });
}

// 导出接口
export function export_goods_list(data) {
  return request({
    url: "/export/goods",
    method: "post",
    responseType: "blob",
    data: data
  });
}

// 下载模板

export function order_down_tem(params) {
  return request({
    url: "/export/goods_import_model",
    method: "post",
    responseType: "blob",
    params
  });
}

// 批量标品&非标品
export function goods_batchStandard(data) {
  return requestMd5({
    url: "/goods/batchStandard",
    method: "post",
    data: data
  });
}

export function goods_likeData(data) {
  return requestMd5({
    url: "/goods/likeData",
    method: "post",
    data: data
  });
}
